QuickOPC User's Guide and Reference
ReadMultipleItemValues(IEasyDAClient,DAItemArguments[],DAReadParameters) Method



OpcLabs.EasyOpcClassic Assembly > OpcLabs.EasyOpc.DataAccess Namespace > IEasyDAClientExtension Class > ReadMultipleItemValues Method : ReadMultipleItemValues(IEasyDAClient,DAItemArguments[],DAReadParameters) Method
The client object that will perform the operation.
Array of item arguments objects (determine the OPC server and an OPC-DA item).
The read parameters (such as data source or value age).
Reads named items from an OPC server or OPC servers. Only the item values are returned (qualities and timestamps are not returned). Reads multiple named item values, using item arguments objects, and common read parameters.
Syntax
'Declaration
 
<ExtensionAttribute()>
<ElementsNotNullAttribute()>
<NotNullAttribute()>
Public Overloads Shared Function ReadMultipleItemValues( _
   ByVal client As IEasyDAClient, _
   ByVal itemArgumentsArray() As DAItemArguments, _
   ByVal readParameters As DAReadParameters _
) As ValueResult()
'Usage
 
Dim client As IEasyDAClient
Dim itemArgumentsArray() As DAItemArguments
Dim readParameters As DAReadParameters
Dim value() As ValueResult
 
value = IEasyDAClientExtension.ReadMultipleItemValues(client, itemArgumentsArray, readParameters)
[Extension()]
[ElementsNotNull()]
[NotNull()]
public static ValueResult[] ReadMultipleItemValues( 
   IEasyDAClient client,
   DAItemArguments[] itemArgumentsArray,
   DAReadParameters readParameters
)
[Extension()]
[ElementsNotNull()]
[NotNull()]
public:
static array<ValueResult^>^ ReadMultipleItemValues( 
   IEasyDAClient^ client,
   array<DAItemArguments^>^ itemArgumentsArray,
   DAReadParameters^ readParameters
) 

Parameters

client
The client object that will perform the operation.
itemArgumentsArray
Array of item arguments objects (determine the OPC server and an OPC-DA item).
readParameters
The read parameters (such as data source or value age).

Return Value

The function returns an array of OpcLabs.EasyOpc.DataAccess.OperationModel.DAVtqResult objects. The indices of elements in the output array are the same as those in the input array, itemArgumentsArray.
Exceptions
ExceptionDescription
A null reference (Nothing in Visual Basic) is passed to a method that does not accept it as a valid argument.
Remarks

The servers can be local or can be remotely accessed via DCOM. Optionally, an access path can be specified or a specific data type can be requested.

The ReadMultipleItemValues method requires that the quality is "good" for each item. The function performs all individual operations in parallel, but only returns after all individual operations are completed (or their timeouts elapse).

This method does not throw an exception in case of OPC operation failures. Instead, the eventual exception related to each item is returned in Exception property of each returned OpcLabs.EasyOpc.DataAccess.OperationModel.DAVtqResult element.

The size of the input array will become the size of the output array. The element positions (indices) in the output array are the same as in the input array.
Requirements

Target Platforms: .NET Framework: Windows 10 (selected versions), Windows 11 (selected versions), Windows Server 2012, Windows Server 2016; .NET Core, .NET 5, .NET 6: Linux, macOS, Microsoft Windows

See Also

Reference

IEasyDAClientExtension Class
IEasyDAClientExtension Members
Overload List